function local() {
    let user = localStorage.getItem('user')
    if (!user) {
        window.location.replace('/login')
    } else {
        user = JSON.parse(user)
        $.ajax({
            type: 'POST',
            url: '/user/querylogin',
            dataType: 'json',
            async: false,
            data: {
                username: user.username, password: user.password
            },
            success: (result) => {
                if (!result.status) {
                    console.log('本地验证失效!')
                    window.location.replace('/login')
                }
                console.log('本地验证成功!')
            }
        })
    }
}